<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%String contextPath = request.getContextPath();%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>渠县信息管理局平台服务端</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<script type="text/javascript">

	function showDetail(staffId){
		document.forms[0].action = "<%=contextPath%>/adminlogin/toUpdateStaffPage.action?id="+staffId; 
		document.forms[0].submit();
	}
	
	function deleteStaff(staffId){
		document.forms[0].action = "<%=contextPath%>/adminlogin/getAllAuth.action"; 
		document.forms[0].submit();
	}
</script>

</head>
<body>
<form method="post" name="from1" id="from1">
<table width="980px" id="table1"
	style="margin-top: 10px; font-size: 12px; BORDER-RIGHT: #C6D7F1 1px ridge; BORDER-TOP: #C6D7F1 1px ridge; BORDER-LEFT: #C6D7F1 1px ridge; BORDER-BOTTOM: #C6D7F1 1px ridge">
	<tr height="35px">
		<th>
			<div style="color: #0063a5">管理名称</div>
		</th>
		<th>
			<div style="color: #0063a5">操作</div>
		</th>
	</tr>
	<s:iterator id="staff" value="#request.listStaff"
		status="status">
		<s:if test="#status.Even">
			<tr bgcolor="#E3F1F9">
				<td align="center" width="80%">${staff.title}</td>
				<td align="center">
					<button onclick="showDetail(${staff.id})">查看详情</button>
					<button onclick="deleteStaff(${staff.id})">删除</button>
				</td>
			</tr>
		</s:if>
		<s:else>
			<tr bgcolor="#fffff">
				<td align="center" width="80%">${staff.title}</td>
				<td align="center">
					<button onclick="showDetail(${staff.id})">查看详情</button>
					<button onclick="deleteStaff(${staff.id})">删除</button>
				</td>
			</tr>
		</s:else>

	</s:iterator>
</table>
</form>


</body>
</html>